// 解决 ie11 兼容 ES6
import 'babel-polyfill';

import Vue from 'vue';
import _ from 'lodash';
import * as echarts from 'echarts';
import moment from 'moment';

import '@/assets/font/iconfont.css';
// font-awesome
import 'font-awesome/css/font-awesome.min.css';

// element-ui 组件库
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 组织架构图
import Vue2OrgTree from 'vue2-org-tree';
import 'vue2-org-tree/dist/style.css';
Vue.use(Vue2OrgTree);

import router from './router';
import store from './store';
import App from './App.vue';

// 引入全局注册的自定义基础组件
import commonComponent from './components';
Vue.use(commonComponent);
import dynamicModal from '@/components/dynamic-modal/index.js';
Vue.use(dynamicModal);

import './filters';
import './directives';

Vue.prototype.$Bus = new Vue();
window.$Bus = Vue.prototype.$Bus;
Vue.prototype.$echarts = echarts;
Vue.prototype.$moment = moment;
Vue.config.productionTip = false;

if (!window._) {
  window._ = _;
}

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app');
